file(GLOB CONSOLEDEMO_SRCS 			src/*.cpp)
file(GLOB CONSOLEDEMO_INCS 			${CMAKE_BINARY_DIR}/ScriptKit/include/*.hpp)

# for MSVC, others
source_group("ConsoleDemo Sources" FILES ${CONSOLEDEMO_SRCS})
#source_group("ConsoleDemo Headers" FILES ${CONSOLEDEMO_INCS})

# FIXME shadowing ..
get_filename_component(SPIDERMONKEY_LIB ${SPIDERMONKEY_LIBRARIES} NAME)

#set(CONSOLEDEMO_LIBS ${SPIDERMONKEY_LIB})
#if(CMAKE_SYSTEM_NAME MATCHES "Linux")
#  set(CONSOLEDEMO_LIBS ${CONSOLEDEMO_LIBS} c dl)
#endif()

include_directories(include ${SPIDERMONKEY_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/ScriptKit/include ${CMAKE_BINARY_DIR}/ScriptKit/include ${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR})

add_executable(ConsoleDemo 			${CONSOLEDEMO_SRCS})

add_definitions(-DSCRIPTKIT_DLL)

#set_target_properties(ConsoleDemo PROPERTIES          OUTPUT_NAME ConsoleDemo)
set_target_properties(ConsoleDemo PROPERTIES          LINKER_LANGUAGE CXX)
target_link_libraries(ConsoleDemo ScriptKit ${Boost_LIBRARIES})

#add_executable(ConsoleDemo_static                ${CONSOLEDEMO_SRCS} ${CONSOLEDEMO_INCS})
#add_dependencies(ConsoleDemo_static ScriptKit_static)
#set_target_properties(ConsoleDemo_static PROPERTIES   OUTPUT_NAME ConsoleDemo_static)
#set_target_properties(ConsoleDemo_static PROPERTIES   LINKER_LANGUAGE CXX )
#target_link_libraries(ConsoleDemo_static ${CONSOLEDEMO_LIBS})

